{	Problem: http://codeforces.ru/problemset/problem/41/A
	Verdict: Accepted

}
var s,t:string; i,res:longint;
begin
readln(s);
readln(t);
if length(s)<>length(t) then res:=0 else begin
  res:=1;
  for i:=1 to length(s) do begin
    if s[i]<>t[length(t)-i+1] then res:=0;
  end;
end;
if res=0 then writeln('NO') else writeln('YES');
end.